package com.dragon.modules.yuegou.query.member;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.member.WxOpenidRefEntity;
import com.dragon.modules.yuegou.enums.member.WxOpenidRefOpenIdType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员openid关系表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2021-09-08 11:22:10
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class WxOpenidRefQuery extends WxOpenidRefEntity implements Query<WxOpenidRefEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员id查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "wxUnionId")
	private Condition<String> wxUnionIdCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "wxOpenId")
	private Condition<String> wxOpenIdCondition;

    /** 支付宝appid查询条件 */
	@JsonUnwrapped(prefix = "aliAppid")
	private Condition<String> aliAppidCondition;

    /** [枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX查询条件 */
	@JsonUnwrapped(prefix = "openIdType")
	private Condition<WxOpenidRefOpenIdType> openIdTypeCondition;

    /** 第三方 appid查询条件 */
	@JsonUnwrapped(prefix = "appid")
	private Condition<String> appidCondition;

    /** 查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public WxOpenidRefQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public WxOpenidRefQuery(WxOpenidRefEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public WxOpenidRefQuery(WxOpenidRefQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.wxUnionIdCondition != null) {
			this.wxUnionIdCondition = other.wxUnionIdCondition.copy();
		}
		if(other.wxOpenIdCondition != null) {
			this.wxOpenIdCondition = other.wxOpenIdCondition.copy();
		}
		if(other.aliAppidCondition != null) {
			this.aliAppidCondition = other.aliAppidCondition.copy();
		}
		if(other.openIdTypeCondition != null) {
			this.openIdTypeCondition = other.openIdTypeCondition.copy();
		}
		if(other.appidCondition != null) {
			this.appidCondition = other.appidCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<WxOpenidRefEntity> toQueryWrapper() {
		QueryWrapper<WxOpenidRefEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (wxUnionIdCondition != null) {
			wxUnionIdCondition.toWrapper(wrapper, COL_WX_UNION_ID);
		}
		if (wxOpenIdCondition != null) {
			wxOpenIdCondition.toWrapper(wrapper, COL_WX_OPEN_ID);
		}
		if (aliAppidCondition != null) {
			aliAppidCondition.toWrapper(wrapper, COL_ALI_APPID);
		}
		if (openIdTypeCondition != null) {
			openIdTypeCondition.toWrapper(wrapper, COL_OPEN_ID_TYPE);
		}
		if (appidCondition != null) {
			appidCondition.toWrapper(wrapper, COL_APPID);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员id查询条件
	 * 
	 * @return memberIdCondition 会员id查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员id查询条件
	 * 
	 * @return memberIdCondition 会员id查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员id查询条件
	 * 
	 * @param memberIdCondition 会员id查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return wxUnionIdCondition 查询条件
	 */
	public Condition<String> wxUnionId() {
		this.wxUnionIdCondition = new Condition<>();
		return this.wxUnionIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return wxUnionIdCondition 查询条件
	 */
	public Condition<String> getWxUnionIdCondition() {
		return wxUnionIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param wxUnionIdCondition 查询条件
	 */
	public void setWxUnionIdCondition(Condition<String> wxUnionIdCondition) {
		this.wxUnionIdCondition = wxUnionIdCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return wxOpenIdCondition 查询条件
	 */
	public Condition<String> wxOpenId() {
		this.wxOpenIdCondition = new Condition<>();
		return this.wxOpenIdCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return wxOpenIdCondition 查询条件
	 */
	public Condition<String> getWxOpenIdCondition() {
		return wxOpenIdCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param wxOpenIdCondition 查询条件
	 */
	public void setWxOpenIdCondition(Condition<String> wxOpenIdCondition) {
		this.wxOpenIdCondition = wxOpenIdCondition;
	}

	/**
	 * 构造并返回支付宝appid查询条件
	 * 
	 * @return aliAppidCondition 支付宝appid查询条件
	 */
	public Condition<String> aliAppid() {
		this.aliAppidCondition = new Condition<>();
		return this.aliAppidCondition;
	}
	
	/**
	 * 获取支付宝appid查询条件
	 * 
	 * @return aliAppidCondition 支付宝appid查询条件
	 */
	public Condition<String> getAliAppidCondition() {
		return aliAppidCondition;
	}

	/**
	 * 设置支付宝appid查询条件
	 * 
	 * @param aliAppidCondition 支付宝appid查询条件
	 */
	public void setAliAppidCondition(Condition<String> aliAppidCondition) {
		this.aliAppidCondition = aliAppidCondition;
	}

	/**
	 * 构造并返回[枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX查询条件
	 * 
	 * @return openIdTypeCondition [枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX查询条件
	 */
	public Condition<WxOpenidRefOpenIdType> openIdType() {
		this.openIdTypeCondition = new Condition<>();
		return this.openIdTypeCondition;
	}
	
	/**
	 * 获取[枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX查询条件
	 * 
	 * @return openIdTypeCondition [枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX查询条件
	 */
	public Condition<WxOpenidRefOpenIdType> getOpenIdTypeCondition() {
		return openIdTypeCondition;
	}

	/**
	 * 设置[枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX查询条件
	 * 
	 * @param openIdTypeCondition [枚举]openid类型：0-悦购小程序-YGIRL、1-悦荷包小程序-WALLET、2-悦商圈公众号-YSQ、3-安卓APP-ANDRIOD、4-IOS-IOS、5-支付宝-ALIPAY、6-答题小程序-TCXDT、7-支付宝小程序-ALIXCX查询条件
	 */
	public void setOpenIdTypeCondition(Condition<WxOpenidRefOpenIdType> openIdTypeCondition) {
		this.openIdTypeCondition = openIdTypeCondition;
	}

	/**
	 * 构造并返回第三方 appid查询条件
	 * 
	 * @return appidCondition 第三方 appid查询条件
	 */
	public Condition<String> appid() {
		this.appidCondition = new Condition<>();
		return this.appidCondition;
	}
	
	/**
	 * 获取第三方 appid查询条件
	 * 
	 * @return appidCondition 第三方 appid查询条件
	 */
	public Condition<String> getAppidCondition() {
		return appidCondition;
	}

	/**
	 * 设置第三方 appid查询条件
	 * 
	 * @param appidCondition 第三方 appid查询条件
	 */
	public void setAppidCondition(Condition<String> appidCondition) {
		this.appidCondition = appidCondition;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return createdTimeCondition 查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param createdTimeCondition 查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

}
